<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
  <head>
      <title>九九乘法表</title>
  </head>
  <body>

    <table border="1" align="center">
      <% for( int i = 1 ; i <= 9 ; i++ ) { %>
      <tr>
        <% for( int j = 1 ; j <= i ; j++ ) { %>
        <td>
          <%= j %> * <%= i %> = <%= j * i %>
        </td>
        <% } %>
      </tr>
      <% } %>
    </table>

    <hr>

    <table border="1" align="center">
      <%
        for( int i = 1 ; i <= 9 ; i++ ) {
          out.println( "<tr>" );
          for( int j = 1 ; j <= i ; j++ ) {
            out.println( "<td>" );
            out.println( j + " * " + i  + " = " + ( j * i ) );
            out.println( "</td>" );
          }
          out.println( "</tr>" );
        }
      %>
    </table>

  </body>
</html>
